package cn.tedu.crm.base.controller;

import cn.tedu.crm.base.response.JsonResult;
import cn.tedu.crm.base.service.CaptchaService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

@RestController
public class CaptchaController {

    @Autowired
    private CaptchaService captchaService;

    @GetMapping("/api/captcha")
    public JsonResult captcha() {
        Map<String, Object> result = captchaService.generateCaptcha();
        return JsonResult.success(result.toString());
    }

}
